using System;
using System.Collections.Generic;
using System.Text;
using Impact.Model.Objects;

namespace Impact.Model.Service
{
    /// <summary>
    /// defines the functions available from the service providing category data
    /// </summary>
    public interface ICategoryService
    {

        /// <summary>
        /// Retrieve the item from the datastore using the given ID
        /// </summary>
        ArticleCategory FetchByID(int categoryId);

        /// <summary>
        /// Retrieve the item from the datastore using the given key
        /// </summary>
        ArticleCategory FetchByKey(string categoryKey);

        /// <summary>
        /// Retrieve all items from the datastore
        /// </summary>
        ArticleCategoryCollection FetchAll(bool onlyVisible);

        /// <summary>
        /// Save the given item to the datastore and logs the given user ID as the modifier
        /// </summary>
        void Save(ArticleCategory category, Guid guid);

        /// <summary>
        /// Removes the given category from the datastore
        /// </summary>
        void Remove(int categoryId);

        /// <summary>
        /// retrieve the number of articles in the given category
        /// </summary>
        int GetCategoryArticleCount(int categoryId);
    }
}
